package com.chen.service.impl;

import com.chen.dao.UserDao;
import com.chen.model.User;
import com.chen.service.UserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service("userService")
public class UserServiceImpl implements UserService {

    @Resource
    private UserDao userDao;

    public User checkLogin(String user_account, String user_password) {

        User user = userDao.findByAccount(user_account);
        if(user != null && user.getUser_password().equals(user_password)){
            return user;
        }
        return null;
    }
}